<template>
  <div class="Subordinates">
    <p>{{ lang.unlimited_development }}</p>
    <div class="img-box">
      <NuxtImg :src="assets.faqImage" alt="FAQ" />
      <div class="text">
        <div>
          <span>{{ lang.bet_discount }}</span>
          <span>{{ lang.reference_member }}</span>
        </div>
      </div>
    </div>
  </div>
  <div class="commissions">
    <p class="commissions-title">{{ lang.direct_commissions }}</p>
    <ul>
      <li v-for="level in commissionLevels" :key="level.id">
        <div class="t_box">
          <div class="title">{{ level.title }}</div>
        </div>
        <div class="b_box">
          {{ level.description }}
        </div>
      </li>
    </ul>
  </div>
  <div class="desc">
    <div class="desc-title">
      <span class="title">{{ lang.footer_desc_title }}</span>
    </div>
    <div class="desc-list">
      <p
        v-for="(rule, index) in lang.footer_rules"
        :key="index"
        class="desc-item"
      >
        {{ index === 0 ? "" : index + ". " }}{{ rule }}
      </p>
    </div>
  </div>
</template>

<script setup lang="ts">
const lang: any = getCurrentPageLang("activity/agente");

interface CommissionLevel {
  id: number;
  title: string;
  description: string;
}

const assets = {
  faqImage: "/images/activity/agente/faq-01.png",
};

const commissionLevels: CommissionLevel[] = [
  {
    id: 1,
    title: lang.level_1,
    description: lang.level_1_desc,
  },
  {
    id: 2,
    title: lang.level_2,
    description: lang.level_2_desc,
  },
  {
    id: 3,
    title: lang.level_3,
    description: lang.level_3_desc,
  },
];
</script>

<style scoped lang="scss">
.Subordinates {
  padding: 0.35rem;
  background: var(--theme-color4);
  color: var(--theme-neutral1);
  border-radius: 0.3rem;
  margin-top: 0.35rem;

  p {
    font-size: 0.375rem;
    text-align: center;
  }

  .img-box {
    margin-top: 0.5rem;
    font-size: 0.34rem;
    position: relative;

    img {
      width: 100%;
    }

    .text div {
      width: 100%;
      padding: 0 0.45rem;
      box-sizing: border-box;
      display: flex;
      justify-content: space-between;
      position: absolute;
      left: 0;
      top: 2.4rem;
    }
  }
}

.commissions {
  box-sizing: border-box;
  margin-top: 0.2rem;

  .commissions-title {
    color: var(--theme-neutral1);
    font-weight: 100;
    font-size: 0.4rem;
    margin-bottom: 0.4rem;
  }

  ul {
    display: flex;
    flex-direction: column;
    gap: 0.21rem;

    li {
      width: 100%;
      height: 2.2rem;
      box-sizing: border-box;
      background: var(--theme-color4);
      border-radius: 0.15rem;
      display: flex;
      align-items: center;

      .t_box {
        height: 100%;
        width: 1.8rem;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--theme-color1);
        border-radius: 0.15rem 0 0 0.15rem;

        .title {
          font-size: 0.4rem;
          font-weight: 700;
          color: var(--theme-neutral1);
        }
      }

      .b_box {
        width: calc(100% - 1.8rem);
        box-sizing: border-box;
        padding: 0 0.35rem;
        font-size: 0.32rem;
        font-weight: 500;
        color: var(--theme-neutral2);
        line-height: 0.4rem;
      }
    }
  }
}

.desc {
  font-weight: 400;
  font-size: 0.35rem;
  margin-top: 0.5rem;
  box-sizing: border-box;
  padding-bottom: 1rem;

  .desc-title {
    display: flex;
    align-items: center;
    font-family: Arial;

    .title {
      color: var(--theme-neutral1);
      font-size: 0.44rem;
    }
  }

  .desc-list {
    font-size: 0.34rem;
    color: var(--theme-neutral2);

    .desc-item {
      margin-top: 0.2rem;
      text-indent: -1em;
      padding-left: 1em;
    }
  }
}
</style>
